package io.github.zhengyue.basics

/**
 * 具名参数，默认参数
 */
val  Pi = 3.14159f
fun getRectangleArea(lenthgh:Float, width:Float):Float = lenthgh * width

fun getCircularPerimeter(PI:Float = Pi, r:Float):Float =  2 * PI * r

fun getCircularPerimeter2(PI:Float = Pi, d:Float):Float =  PI * d

fun getCylinderVolume(PI:Float = Pi, r:Float, h:Float):Float =  PI * r * r * h

fun getBallSurfaceArea(PI:Float = Pi, r:Float):Float =  4 * PI * r * r

fun main(args: Array<String>) {
    val area = getCircularPerimeter(r = 2.0f)
    println(area)
}